const ShowRoom = require("../database/model-showroom");
const showrooms = async (ctx) => {
  const detail = {
    // 展厅状态
    showRoomStatus: [
      { value: 0, label: "闭馆" },
      { value: 1, label: "开馆" },
    ],
    // 是否需要讲解员
    needInterpreterOptions: [
      { value: 1, label: "需要" },
      { value: 0, label: "不需要" },
    ],
    // 讲解语言
    explanationLanguage: [{
        value: 0,
        label: "英语",
        includeShowrooms: [
          "储能集成工厂",
          "储能PACK车间",
          "梦想与创新展示中心",
          "储能电芯实验室",
          "支架展厅&车间",
        ],
        includeShowroomsId: [2, 3, 4, 5, 7],
      },
      { value: 1, label: "中文" },
    ],
    // 讲解版本
    explanationVersion: [
      { value: 0, label: "通用版本" },
      { value: 1, label: "政府版本" },
      { value: 2, label: "党建版本" },
    ],
    // 讲解通道（只有m3车间有，名称匹配）
    explanationRoute: [
      { value: "0", label: "车间" },
      { value: "1", label: "通道" },
    ],
    // 是否需要拍照
    needPhotographOptions: [
      { value: 1, label: "需要" },
      { value: 0, label: "不需要" },
    ],
    photoNotSupportShowrooms: [
      { id: 3, name: "储能集成工厂"},
      { id: 4, name: "储能PACK车间"},
      { id: 7, name: "梦想与创新展示中心"},
      { id: 5, name: "储能电芯实验室"},
    ],
  }
  // const showrooms = [
  //     { id: 3, name: "储能集成工厂"},
  //     { id: 4, name: "储能PACK车间"},
  //     { id: 7, name: "梦想与创新展示中心"},
  //     { id: 5, name: "储能电芯实验室"},
  //     { id: 2, name: "支架展厅&车间"},
  //     { id: 1, name: "光伏展厅&车间"},
  //     { id: 6, name: "国家级光伏研究院展示中心"},
  //     { id: 8, name: "光伏生产M3车间"},
  //   ];

   const allrooms = await ShowRoom.findAll();
  ctx.success({
    data: {allrooms, detail},
  });
};

module.exports = showrooms;
